package ch3.tskeexecutor;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

@Service
public class AsyncTaskService {
    @Async//该注解声明为异步方法
    public void executeAsynTask(Integer i){
        System.out.println("执行异步任务");
    }
    @Async
    public void excuteAsyncTaskPlus(Integer i){
        System.out.println("执行异步任务+1"+(i+1));
    }
}
